package com.flipdf2.serialize.ppml.element;

import org.jdom.Element;
import org.jdom.Namespace;

import com.flipdf2.serialize.ppml.PPMLException;

public class PPMLTicketRef {
	public static final String NAME = "TICKET_REF";
	
	private String extIDRef;
	private String ref;
	
	public Element toXML(Namespace defaultNamespace) {
		Element root = null;
		if (defaultNamespace != null) {
			root = new Element(NAME, defaultNamespace);
		} else {
			root = new Element(NAME);	
		}
		
		if (extIDRef != null) 
			root.setAttribute("ExtIDRef", extIDRef);
		if (ref != null) 
			root.setAttribute("Ref", ref);
		
		return root;
	}

	public void check() throws PPMLException {
	}
	
	public String getExtIDRef() {
		return extIDRef;
	}

	public void setExtIDRef(String extIDRef) {
		this.extIDRef = extIDRef;
	}

	public String getRef() {
		return ref;
	}

	public void setRef(String ref) {
		this.ref = ref;
	}
}
